Presentation: Tweet"Concurrency in Practice: a Scala case study"
In an increasingly networked world it is no longer possible for programs to pretend everything happens sequentially. Many solutions have been proposed to deal with this inherently concurrent world: locks, actors, futures, asynchronous I/O, parallel algorithms, agents, software transactional memory, processes, and more. It is becoming increasingly clear that there is no "one size fits all" solution to concurrency and parallelism. That's why some of the most innovative languages (Clojure, Haskell, and Scala) provide all the above mechanisms to the programmer. Now it is up to the programmer to choose the correct solution.
In this talk we'll take a look at a real application written in Scala and discuss why certain constructs were chosen:
- Parallel collections to improve performance.
- Agents for running expensive background processes.
- Futures to tame asynchronous I/O.
- Software transactional memory to safely share state between various processes.
- Actors to communicate with external systems.
Keywords: JVM, Scala, concurrency, parallelism, case study
Target Audience: developers that need to deal with an increasingly concurrent world